@extends('admin/layout')
@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="#">合作商列表</a></li>
                <li class="active">合作商信息修改</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12" style="width: 100%;">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title"></h3>
                        </div>
                        <!-- /.box-header -->
                        <span id="msg" style="display: none">
              @if (count($errors) > 0)
                                @foreach ($errors->all() as $error)
                                    <div style="width: 100%;">
                    <span style="color: red;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ $error }}</span>
                  </div>
                                @endforeach
                            @endif
            </span>
                        <script type="text/javascript">
                            var _msg = $('#msg div span').text();
                            console.log(_msg);
                            if(_msg != ''){
                                layer.msg(_msg);
                            }
                        </script>
                        <!-- form start -->

                        <form role="form" action="{{ url('admin/updatePartner') }}" method="post">
                            {{ csrf_field() }}
                            <input type="hidden" name="id" value="{{ $list['id'] }}" />
                            <div class="box-body" style="width: 50%;">
                                <div class="form-group">
                                    <label for="exampleInputEmail1">合作商名称</label>
                                    <input type="text" name="name" class="form-control" id="exampleInputEmail1" placeholder="manage name" value="{{$list['name']}}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">合作商描述</label>
                                    {{--<input type="text" name="content" class="form-control" id="exampleInputEmail1" placeholder="manage name" value="{{$list['content']}}">--}}
                                    <textarea rows="4" style="width: 100%" name="content" value="">{{ $list['content'] }}</textarea>
                                </div>
                                {{--<div class="form-group" style="margin-left: 10px;">--}}
                                    {{--<label for="exampleInputEmail1">所属业务管理员：</label>--}}
                                    {{--<select name="man">--}}
                                        {{--@foreach($role as $value)--}}
                                            {{--<option value="{{ $value['id'] }}">{{ $value['username'] }}</option>--}}
                                        {{--@endforeach--}}
                                    {{--</select>--}}
                                {{--</div>--}}
                            </div>
                            <!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">提交修改</button>
                            </div>
                        </form>

                    </div>
                    <!-- /.box -->

                </div>

                <!--/.col (right) -->
            </div>
            <!-- /.row -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
@stop
